package com.mingqijia.gassafety.webserver.response.sk;

import cn.hutool.json.JSONUtil;
import java.util.List;
import lombok.Data;

/**
 * @author solyutian
 * @date 2023/7/6 09:50
 */
@Data
public class ConsoleSkRecordLogData {

  private List<ConsoleSkRecordLogList> list;

  public static void main(String[] args) {
    String s = "{\n"
        + "  \"code\":0,\n"
        + "  \"msg\":\"成功\",\n"
        + "  \"data\": {\n"
        + "    \"list\": [\n"
        + "      {\n"
        + "        \"alarmDate\": \"2023-04-15\",\n"
        + "        \"alarmCnt\": 10,\n"
        + "        \"completeCnt\": 0\n"
        + "      },\n"
        + "      {\n"
        + "        \"alarmDate\": \"2023-04-16\",\n"
        + "        \"alarmCnt\": 12,\n"
        + "        \"completeCnt\": 1\n"
        + "      }   ]\n"
        + "  }\n"
        + "}";

    ConsoleSkRecordLogResponse consoleSkRecordLogResponse = JSONUtil
        .toBean(s, ConsoleSkRecordLogResponse.class);
    System.out.println(consoleSkRecordLogResponse);
  }

}

